find_library(LIBEVENT event)
if(LIBEVENT)
    message("libevent lib has been found")
else()
    message(FATAL_ERROR "libevent has not been found")
endif()

find_library(PROTOBUF protobuf)
if(PROTOBUF)
    message("protobuf lib has been found")
else()
    message(FATAL_ERROR "protobuf has not been found")
endif()

add_executable(aggserver main.cpp ${PROJECT_SOURCE_DIR}/proto/rawdata.pb.cc)
target_link_libraries(aggserver event protobuf)
set_target_properties(aggserver PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
